package cn.wusifx.zabbix.request.builder.user;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.CreateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/usermacro/createglobal
 */
public class UserMacroCreateGlobalRequestBuilder extends CreateRequestBuilder {
    private String macro;
    private String value;
    public UserMacroCreateGlobalRequestBuilder(String auth) {
        super("usermacro.createglobal", auth);
    }

    public UserMacroCreateGlobalRequestBuilder(Long id, String auth) {
        super("usermacro.createglobal", id, auth);
    }

    public String getMacro() {
        return macro;
    }

    public UserMacroCreateGlobalRequestBuilder setMacro(String macro) {
        this.macro = macro;
        return this;
    }

    public String getValue() {
        return value;
    }

    public UserMacroCreateGlobalRequestBuilder setValue(String value) {
        this.value = value;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("macro",macro);
        baseRequest.getParams().put("value",value);
        return baseRequest;
    }
}
